/**
 * 
 */
package com.lotto.manager.demo.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lotto.manager.common.base.service.BaseService;
import com.lotto.manager.demo.dao.IUserDao;
import com.lotto.manager.demo.entity.db.UserEntity;
import com.lotto.manager.demo.service.IUserService;

/**
 * User Service类
 * 
 * @author duanhx
 * @version [Ver 1.0; 2012-7-22]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@Service
public class UserService extends BaseService<UserEntity> implements IUserService {
	
	@Autowired
	private IUserDao userDao;

	@Override
	public UserEntity getUser(UserEntity user) {
		
		return null;// userDao.getEntity(user);
	}

	@Override
	public List<UserEntity> getUserList(UserEntity user) {
	
		return null;//userDao.getEntityList(user);
	}

	@Override
	public void addUser(UserEntity user) {

		//userDao.addEntity(user);
	}

	@Override
	public void updateUser(UserEntity user) {
		
		//userDao.updateEntity(user);
	}
	
	@Override
	public void saveUser(UserEntity user) {
		// 如果id为null, 则新增user
		if (user.getId() == null) {
			addUser(user);
		} else { // 否则为修改user
			updateUser(user);
		}
	}

	@Override
	public void deleteUser(String[] ids) {
		
		//userDao.delete(Arrays.asList(ids));
	}
}
